package com.sinvo.oa.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.sinvo.oa.entity.model.system.SysUser;
import com.sinvo.oa.entity.vo.system.LoginVo;
import com.sinvo.oa.entity.vo.system.SysUserQueryVo;

import java.util.Map;

/**
 * @Description 用户 service接口
 */
public interface SysUserService extends IService<SysUser> {

    //分页查询
    Page<SysUser> findUserByPage(Page<SysUser> page, SysUserQueryVo sysUserQueryVo);

    //保存用户
    void saveUser(SysUser user);

    //修改用户状态
    boolean changeStatus(Long id, Integer status);

    //登录方法 返回token
    String verify(LoginVo loginVo);

    //根据username查询用户
    SysUser findUserByUserName(String username);

    //获取用户信息
    Map<String, Object> getCurrentUser();

    //更新用户
    void updateUser(SysUser user);

    //删除用户
    boolean removeUser(Long id);
}
